home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / umich / utils / colacalc.lzh / COLACALC.TXT < prev   
Text File  |  1995-08-18  |  14KB  |  337 lines

  1.                             ColaCalc (Version 1.3)
  2.                                  by Dan Wilga
  3.  
  4.           Copyright © 1995, Gribnif Software.  All Rights Reserved.
  5.  
  6. This program may be distributed without charge, provided that this text
  7. file is present and that it and the program files are unmodified.
  8.  
  9.  
  10. ChocolateWare
  11. -------------
  12.  
  13. This program was originally ColaWare (duh!), but it's now ChocolateWare.
  14. If you find it useful, you are encouraged to show your appreciation by
  15. sending a quantity of chocolate candy to the address below. What kind and
  16. how much are up to you. Please just limit yourself to chocolate, either
  17. with or without nuts (no fruits or liquers, please).
  18.  
  19.   Dan Wilga
  20.   Gribnif Software
  21.   PO Box 779
  22.   Northampton, MA  01061
  23.  
  24.      GEnie: GRIBNIF
  25.   Internet: gribnif@genie.geis.com
  26.  
  27.  
  28. Overview
  29. --------
  30.  
  31.   What? ANOTHER calculator? Yup, another calculator. But this one's
  32.   different, I promise!
  33.  
  34.   There are a number of really good calculator programs out there for the
  35.   ST.  Most of them just don't fit my needs for several reasons. The simple
  36.   ones don't have what I need, and the ones that do have all of the
  37.   programming functions I want are too huge, difficult to use, and take too
  38.   much memory.  And even though most of them are desk accessories, you
  39.   still can't access a desk accessory within a non-GEM program. So I've
  40.   always had to keep my old Casio calculator sitting on top of the
  41.   computer.
  42.  
  43.   Enter ColaCalc. This tiny little program (about 8k) is a full-featured
  44.   programmer's calculator. No pretty dialog box, no floating point, no
  45.   linear regression, but a calculator that's always there when you need it.
  46.   And, best of all, you can change the keys to whatever you want, you
  47.   aren't stuck with what I think are good keyboard equivalents!
  48.  
  49.   ColaCalc can be activated at a single keypress. The display occupies the
  50.   very bottom of your screen, and as such hides very little data. The
  51.   calculator functions include the standard operators, bit manipulation,
  52.   word size and base (binary, octal, decimal, or hex.) There is also a
  53.   special mode that lets you see the scan code generated by any key on the
  54.   keyboard.
  55.  
  56.   ColaCalc can even insert the value in the display into your text editor
  57.   or word processor, automagically!
  58.  
  59.   It is also designed to work in any standard video mode, as well as with
  60.   the TT, Falcon, MegaSTe, and Crazy Dots video board.
  61.  
  62.  
  63. Installation:
  64. ------------
  65.  
  66.   Run COLACALC.PRG from the desktop, or place it in your AUTO folder. If you
  67.   use a COLACALC.DAT file, then it should be in the same folder as the program.
  68.   If you are holding down the Alternate key while ColaCalc is loading, then it
  69.   will not install itself. This is a good way to keep it from installing when
  70.   it is in your AUTO folder, without having to re-boot.
  71.  
  72.   IMPORTANT: If you use the Templemon debugger, ColaCalc may not be able to
  73.   be activated. Templemon uses the same vector for monitoring the keyboard
  74.   that ColaCalc does, and it may prevent ColaCalc from seeing keypresses.
  75.   In order for ColaCalc to work, it must be placed physically after
  76.   TEMPLMON.PRG in the AUTO folder.
  77.  
  78.  
  79. Activating It:
  80. -------------
  81.  
  82.   Unless you have changed the activation keypress (see Configuration), you
  83.   can always call ColaCalc from within any program simply by pressing
  84.   Control-Undo. The only time ColaCalc may not appear is when a disk access
  85.   is occuring. To quit ColaCalc, press either Esc or Undo.
  86.  
  87.   If you call ColaCalc within a text editor or word processor, you can have
  88.   it pass the value in the display to the program, to become part of the
  89.   text. Simply hold down the Alternate key while pressing Esc or Undo to
  90.   quit. As soon as you release the Alternate key, the text editor will
  91.   receive the display value, as though it had been typed on the keyboard.
  92.   It is important that you not press any of the Shift keys while this is
  93.   going on, or the editor may become confused.
  94.  
  95.  
  96. The Display:
  97. -----------
  98.  
  99.   Here is a diagram of what the parts of the display mean:
  100.  
  101.                 ulb 10100010101010001010100010101001 XOR 1.......9.
  102.                 ||| \                              /  |  \         \
  103.                / | \  --------- number -----------    |   function key memories
  104. signed/unsigned  |  base                           operator
  105.              word size
  106.  
  107.  
  108.   All keyboard controls listed below are the defaults.
  109.  
  110.   Signed (S key); Unsigned (U key):
  111.  
  112.     These control whether or not a negative number is to be displayed with
  113.     a minus sign in front of it (signed) or if the sign bit should be
  114.     displayed as part of the number (unsigned). These can also affect
  115.     translating between word sizes (see below).
  116.  
  117.   Word Size: Byte (Alt-B); Word (Alt-W); Long (Alt-L):
  118.  
  119.     By setting the word size you affect how much of the number is
  120.     displayed.  If, for example, the display is set for Byte, the largest
  121.     value that can be displayed is FF (hex).
  122.  
  123.     When changing from a small word size to a larger one, the value is
  124.     sign-extended if the display is set to show the sign, otherwise it is
  125.     not.  This means that if, for example, you are converting FF from a
  126.     byte to a word without the sign, then this will become 00FF. If, on the
  127.     other hand, the sign is being used, FF (which shows up as -1) will
  128.     still be -1 after the extension.
  129.  
  130.   Base: Binary (Control-B); Octal (Control-O); Decimal (Control-D);
  131.       Hexadecimal (Control-H):
  132.  
  133.     These control the base to display values in. In Binary mode, large
  134.     numbers will have small circles after every eight bits to indicate the
  135.     byte boundaries.
  136.  
  137.   Number:
  138.  
  139.     The keys 0-9 and A-F (or a-f) can be used to enter numbers. The keypad
  140.     keys will also work under the default configuration.
  141.  
  142.   Function:
  143.  
  144.     This portion of the display shows what function was last entered. It may
  145.     also contain "-E-" if an error occurred; if this happens, press
  146.     Clr/Home.
  147.  
  148.   Function Key Memories:
  149.  
  150.     The F1-F10 keys can be assigned values by pressing Shift along with the
  151.     appropriate F-key. A number can be recalled later by pressing just the
  152.     function key, without Shift. If a particular function key has a
  153.     non-zero value assigned to it, this will show up in the function key
  154.     segment of the display.
  155.  
  156.   The display will not include the function key segment or the function
  157.   name if you are using low resolution.
  158.  
  159.  
  160. Miscellaneous Keys:
  161. ------------------
  162.  
  163.   =, Return, Enter      Calculate result
  164.   Undo, Esc             Quit ColaCalc
  165.   Alt-Undo, Alt-Esc     Quit and type value
  166.   Clr/Home              Clear display/Clear error
  167.   Shift-Fkey            Set memory
  168.   Fkey                  Recall memory
  169.   Backspace             Undo last digit typed
  170.   Help                  Enter/Exit Keypress mode
  171.  
  172.   The first time you press Clr/Home clears the display or any error
  173.   condition, which shows up as "-E-". If you press it a second time, any
  174.   operator still waiting to be processed is cleared.
  175.  
  176.   When in Keypress mode, the display shows the value for any shift keys
  177.   pressed, the scan code of the last key pressed, its ASCII value in hex,
  178.   and the actual character that key produces (if non-zero.) This is handy
  179.   for writing your own configuration file (see below). To exit Keypress
  180.   mode, press the Help key again.
  181.  
  182.  
  183. Operators:
  184. ---------
  185.  
  186.   Unary operators (NEG, NOT and the PEEKs) are processed immediately.
  187.   Binary operators (like + and *) are processed in the order they are
  188.   received, with the exception of * and /, which take highest precedence.
  189.   This means that:
  190.  
  191.     1 + 2 * 3      is processed as  1+(2*3)
  192.     1 * 2 + 3      is processed as  (1*2)+3
  193.     1 + 2 * 3 / 2  is processed as  1+((2*3)/2)
  194.     1 & 2 * 3      is processed as  1&(2*3)
  195.  
  196.   If the second operand is not entered for a binary operator, then the
  197.   first operand is reused. This means that:
  198.  
  199.     2 * =          is processed as  2*2
  200.     4 / =          is processed as  4/4
  201.  
  202.   A binary operator can be replaced with another by simply entering the new
  203.